{{assign var="title" value="用户列表"}}
{{include file="admin/intop.html"}}
<div class="toolsBar clear">
     <a href="admin.php?ctl=user" class="button_style">返回</a>
 </div>
<style>
        .lr{width:100px;}
      /*  td.lf input{float:left;}*/
        .ico-succ{display: none;}
</style>
<script src="res/js/jquery/jquery-migrate-1.1.1.js" type="text/javascript"></script>
<script src="res/js/base.js" type="text/javascript"></script>

<script type="text/javascript" src="res/js/geo_selection.js"></script>
<script type="text/javascript" src="res/js/lhgcalendar/lhgcalendar.min.js"></script>
<script type="text/javascript">
$(function(){
	var initGeoCode = "3";    
	geoSelection.firstGeoLevel = 1;
	geoSelection.lastGeolevel = 5;
	geoSelection.geoInputName = "geo_code";
	geoSelection.geoLayerId = "geo_selection";
	//geoSelection.initSelected(initGeoCode);
	geoSelection.initGeoSelection("{{$user.info.GEO_CODE}}");
    $('#BIRTHDAY').calendar();
});
</script>
<script type="text/javascript" src="res/js/formvalidator/formValidator-4.1.3.js"></script>
<script type="text/javascript" src="res/js/formvalidator/formValidatorRegex.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
	$.formValidator.initConfig({theme:"126",formID:"form1",mode:'AutoTip',onError:function(msg){alert(msg)},inIframe:true});
	$("#EMAIL").formValidator({onShowFixText:"6~18个字符，包括字母、数字、下划线，以字母开头，字母或数字结尾",onShow:"请输入邮箱",onFocus:"邮箱6-100个字符,输入正确了才能离开焦点",onCorrect:"恭喜你,你输对了",defaultValue:"{{if $user.info.EMAIL}}{{$user.info.EMAIL}}{{else}}@{{/if}}"}).inputValidator({min:6,max:100,onError:"你输入的邮箱长度非法,请确认"}).regexValidator({regExp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onError:"你输入的邮箱格式不正确"});
    $("#IDCARD").formValidator({onShow:"请输入15或18位的身份证",onfocus:"输入15或18位的身份证",onCorrect:"输入正确"}).regexValidator({regExp:"idcard",dataType:"enum",onError:"你输入的身份证格式不正确"});;
    $("#ADDRESS").formValidator({onShow:"请输入详细地址",onfocus:"请输入详细地址",onCorrect:"输入正确"}).inputValidator({min:2,onError:"请输入详细地址"}).regexValidator({regExp:"notempty",dataType:"enum",onError:"请输入详细地址"});
    $("#REALNAME").formValidator({onShow:"请输入真实姓名",onfocus:"请输入真实姓名",onCorrect:"输入正确"}).inputValidator({min:2,onError:"请输入真实姓名"}).regexValidator({regExp:"notempty",dataType:"enum",onError:"请输入真实姓名"});

    $("#geo_level2").formValidator({tipID:"geo_codeTip",onShow:"至少1个长度",onCorrect:""}).inputValidator({min:1,onError: "请选择所在市!"}).defaultPassed();
    $("#geo_level3").formValidator({tipID:"geo_codeTip",onShow:"至少1个长度",onCorrect:""}).inputValidator({min:1,onError: "请选择所在地区!"}).defaultPassed();
    $("#geo_level4").formValidator({tipID:"geo_codeTip",onShow:"至少1个长度",onCorrect:""}).inputValidator({min:1,onError: "请选择所在乡镇!"}).defaultPassed();
    $("#geo_level5").formValidator({tipID:"geo_codeTip",onShow:"至少1个长度",onCorrect:""}).inputValidator({min:1,onError: "请选择所在村级!"}).defaultPassed();

    $.formValidator.reloadAutoTip();
});
function chkgeo(){
        if($("#geo_level2").find("option").length<=1){ $("#geo_level2").unFormValidator(true); }else{$("#geo_level2").unFormValidator(false);}
        if($("#geo_level3").find("option").length<=1){ $("#geo_level3").unFormValidator(true); }else{$("#geo_level3").unFormValidator(false);}
        if($("#geo_level4").find("option").length<=1){ $("#geo_level4").unFormValidator(true); }else{$("#geo_level4").unFormValidator(false);}
        if($("#geo_level5").find("option").length<=1){ $("#geo_level5").unFormValidator(true); }else{$("#geo_level5").unFormValidator(false);}
}
</script>
<form id="form1" name="form1" onsubmit="chkgeo();" method="post" action="admin.php?ctl=user&act={{$smarty.request.act}}">
<input type="hidden" name="id" value="{{$user.INFOID}}">
<input type="hidden" name="actname" value="save">
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="table_list">
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 手机号码</td>
    <td class="lf">
            {{$user.USERNAME}}
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 资料状态</td>
    <td class="lf">
        <input type="radio" name="STATE" id="STATE1" value="0"{{if $user.info.STATE=="" || $user.info.STATE==0}} checked="checked"{{/if}}/><label for="state1">未认证</label>
        <input type="radio" name="STATE" id="STATE2" value="1"{{if $user.info.STATE==1}} checked="checked"{{/if}}/><label for="state2">审核中</label>
        <input type="radio" name="STATE" id="STATE3" value="2"{{if $user.info.STATE==2}} checked="checked"{{/if}}/><label for="state2">已认证</label>
        </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 实名状态</td>
    <td class="lf">
        <input type="radio" name="STATE_REAL" id="STAT_REAL1" value="0"{{if $user.info.STATE_REAL=="" || $user.info.STATE_REAL==0}} checked="checked"{{/if}}/><label for="state1">未实名</label>
        <input type="radio" name="STATE_REAL" id="STAT_REAL2" value="1"{{if $user.info.STATE_REAL==1}} checked="checked"{{/if}}/><label for="state2">审核中</label>
        <input type="radio" name="STATE_REAL" id="STAT_REAL3" value="2"{{if $user.info.STATE_REAL==2}} checked="checked"{{/if}}/><label for="state2">已实名</label>
        </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 真实姓名</td>
    <td class="lf">
            <input name="REALNAME" type="text" maxlength="20" id="REALNAME" value="{{$user.info.REALNAME}}" style="width:200px;" />
            <div id="realnameTip" ></div>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 身份证</td>
    <td class="lf">
            <input name="IDCARD" type="text" maxlength="20" id="IDCARD" value="{{$user.info.IDCARD}}" style="width:200px;" />
            <div id="idcardTip" ></div>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 身份证照片</td>
    <td class="lf">
        正面：<a href="{{$user.info.IDCARD_URL}}" target="_blank"><img src="{{$user.info.IDCARD_URL}}" style="width:100px;height:60px;" /></a>
        反面：<a href="{{$user.info.IDCARD_URL_BACK}}" target="_blank"><img src="{{$user.info.IDCARD_URL_BACK}}" style="width:100px;height:60px;" /></a>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 现住地址</td>
    <td class="lf" id="geo_selection" class="clear" style="line-height:25px;">
        <div style="float:left;">   
        <select name="geo_level1" id="geo_level1" style="width:80px;"></select>
        <select name="geo_level2" id="geo_level2" style="width:80px;display:none"></select>
        <select name="geo_level3" id="geo_level3" style="width:80px;display:none"></select><br/>
        <select name="geo_level4" id="geo_level4" style="width:80px;display:none"></select>
        <select name="geo_level5" id="geo_level5" style="width:80px;display:none"></select>
        </div>
        <div id="geo_codeTip" ></div>
        <input type="hidden" name="geo_code" id="geo_code" value="0" />
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 详细地址</td>
    <td class="lf">
            <input name="ADDRESS" type="text" maxlength="20" id="ADDRESS" value="{{$user.info.ADDRESS}}" style="width:200px;" />
            <div id="addressTip" ></div>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">性别</td>
    <td style="text-align:left;">
                        <input type="radio" id="sex" value="1" name="SEX"{{if $user.info.SEX == "1" || !$user.info.SEX}} checked{{/if}} />男&nbsp;&nbsp;&nbsp;&nbsp;
                        <input type="radio" id="sex1" value="2" name="SEX"{{if $user.info.SEX == "2"}} checked{{/if}} />女
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 邮箱</td>
    <td class="lf">
            <input name="EMAIL" type="text" maxlength="20" id="EMAIL" value="{{$user.info.EMAIL}}" style="width:200px;" />
            <div id="emailTip" ></div>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">QQ</td>
    <td class="lf">
            <input name="QQ" type="text" maxlength="20" id="QQ" value="{{$user.info.QQ}}" style="width:200px;" />
            <div id="emailTip" ></div>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 学历：</td>
    <td class="lf">
            <select name="EDUCATION" id="EDUCATION">
                <option value="">=请选择=</option>
                <option value="高中或以下" {{if $user.info.EDUCATION=='高中或以下'}}selected="selected"{{/if}}>高中或以下</option>
                <option value="大专" {{if $user.info.EDUCATION=='大专'}}selected="selected"{{/if}}>大专</option>
                <option value="本科" {{if $user.info.EDUCATION=='本科'}}selected="selected"{{/if}}>本科</option>
                <option value="研究生或以上" {{if $user.info.EDUCATION=='研究生或以上'}}selected="selected"{{/if}}>研究生或以上</option>
            </select>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 出生日期：</td>
    <td class="lf">
           <input class="runcode" name="BIRTHDAY" id="BIRTHDAY" value="{{$user.info.BIRTHDAY}}" />
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">婚姻状况：</td>
    <td class="lf">
                    <input type="radio" class="f-radio" value="已婚" name="MARRY" {{if $user.info.MARRY=='已婚'}}checked="checked"{{/if}}> 已婚
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="未婚" name="MARRY" {{if $user.info.MARRY=='未婚' || !$user.info.MARRY}}checked="checked"{{/if}}> 未婚
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="离异" name="MARRY" {{if $user.info.MARRY=='离异'}}checked="checked"{{/if}}> 离异
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="丧偶" name="MARRY" {{if $user.info.MARRY=='丧偶'}}checked="checked"{{/if}}> 丧偶   
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">有无子女：</td>
    <td class="lf">
                    <input type="radio" class="f-radio" value="2" name="HASCHILD" {{if $user.info.HASCHILD=='2'}}checked="checked"{{/if}}> 有
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="1" name="HASCHILD" {{if $user.info.HASCHILD=='1'  || !$user.info.HASCHILD}}checked="checked"{{/if}}> 无

    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 亲属：</td>
    <td class="lf">
                    直系亲属-姓名<input type="text" id="RELATIVE_NAME" name="RELATIVE_NAME" value="{{$user.info.RELATIVE.NAME}}">
                    直系亲属-关系<input type="text" id="RELATIVE_SHIP" name="RELATIVE_SHIP" value="{{$user.info.RELATIVE.SHIP}}">
                    直系亲属-电话<input type="text" id="RELATIVE_TEL" name="RELATIVE_TEL" value="{{$user.info.RELATIVE.TEL}}">  
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 单位名称：</td>
    <td class="lf">
                    <input type="text" id="WORK_NAME" name="WORK_NAME" value="{{$user.info.WORK.NAME}}">  
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">公司行业：</td>
    <td class="lf">
                    <select id="WORK_TYPE" name="WORK_TYPE">
                        <option value="">请选择</option>
                        <option value="1" {{if $user.info.WORK.TYPE=='1'}}selected="selected"{{/if}}>制造业</option>
                        <option value="2" {{if $user.info.WORK.TYPE=='2'}}selected="selected"{{/if}}>IT</option>
                        <option value="3" {{if $user.info.WORK.TYPE=='3'}}selected="selected"{{/if}}>政府机关</option>
                        <option value="4" {{if $user.info.WORK.TYPE=='4'}}selected="selected"{{/if}}>媒体/广告</option>
                        <option value="5" {{if $user.info.WORK.TYPE=='5'}}selected="selected"{{/if}}>零售/批发</option>
                        <option value="6" {{if $user.info.WORK.TYPE=='6'}}selected="selected"{{/if}}>教育/培训</option>
                        <option value="7" {{if $user.info.WORK.TYPE=='7'}}selected="selected"{{/if}}>公共事业</option>
                        <option value="8" {{if $user.info.WORK.TYPE=='8'}}selected="selected"{{/if}}>交通运输业</option>
                        <option value="9" {{if $user.info.WORK.TYPE=='9'}}selected="selected"{{/if}}>房地产业</option>
                        <option value="10" {{if $user.info.WORK.TYPE=='10'}}selected="selected"{{/if}}>能源业</option>
                        <option value="11" {{if $user.info.WORK.TYPE=='11'}}selected="selected"{{/if}}>金融/法律</option>
                        <option value="12" {{if $user.info.WORK.TYPE=='12'}}selected="selected"{{/if}}>餐饮/旅馆业</option>
                        <option value="13" {{if $user.info.WORK.TYPE=='14'}}selected="selected"{{/if}}>医疗/卫生/保健</option>
                        <option value="14" {{if $user.info.WORK.TYPE=='14'}}selected="selected"{{/if}}>建筑工程</option>
                        <option value="15" {{if $user.info.WORK.TYPE=='15'}}selected="selected"{{/if}}>农业</option>
                        <option value="16" {{if $user.info.WORK.TYPE=='16'}}selected="selected"{{/if}}>娱乐服务业</option>
                        <option value="17" {{if $user.info.WORK.TYPE=='17'}}selected="selected"{{/if}}>体育/艺术</option>
                        <option value="18" {{if $user.info.WORK.TYPE=='18'}}selected="selected"{{/if}}>公益组织</option>
                        <option value="19" {{if $user.info.WORK.TYPE=='19'}}selected="selected"{{/if}}>其它</option>
                    </select>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">公司规模：</td>
    <td class="lf">
                    <select id="WORK_SIZE" name="WORK_SIZE">
                        <option value="">请选择</option>
                        <option value="1" {{if $user.info.WORK.SIZE=='1'}}selected="selected"{{/if}}>10人以下</option>
                        <option value="2" {{if $user.info.WORK.SIZE=='2'}}selected="selected"{{/if}}>10-100人</option>
                        <option value="3" {{if $user.info.WORK.SIZE=='3'}}selected="selected"{{/if}}>100-500人</option>
                        <option value="4" {{if $user.info.WORK.SIZE=='4'}}selected="selected"{{/if}}>500人以上</option>
                    </select>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">职业状况：</td>
    <td class="lf">
                    <select id="WORK_STATE" name="WORK_STATE">
                        <option value="">请选择</option>
                        <option value="1"  {{if $user.info.WORK.STATE=='1'}}selected="selected"{{/if}}>工薪阶层</option>
                        <option value="2"  {{if $user.info.WORK.STATE=='2'}}selected="selected"{{/if}}>企业老板</option>
                        <option value="3"  {{if $user.info.WORK.STATE=='3'}}selected="selected"{{/if}}>个体经营</option>
                        <option value="4"  {{if $user.info.WORK.STATE=='4'}}selected="selected"{{/if}}>其他</option>
                    </select>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">职位：</td>
    <td class="lf">
                  <input type="text" id="WORK_JOB" name="WORK_JOB" value="{{$user.info.WORK.JOB}}">
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"><font color="red">*</font> 月收入：</td>
    <td class="lf">
                    <select id="WORK_MONEY" name="WORK_MONEY">
                        <option value="">请选择</option>
                        <option value="1" {{if $user.info.WORK.MONEY=='1'}}selected="selected"{{/if}}>1000元以下</option>
                        <option value="2" {{if $user.info.WORK.MONEY=='2'}}selected="selected"{{/if}}>1001-2000元</option>
                        <option value="3" {{if $user.info.WORK.MONEY=='3'}}selected="selected"{{/if}}>2001-5000元</option>
                        <option value="4" {{if $user.info.WORK.MONEY=='4'}}selected="selected"{{/if}}>5001-10000元</option>
                        <option value="5" {{if $user.info.WORK.MONEY=='5'}}selected="selected"{{/if}}>10001-20000元</option>
                        <option value="6" {{if $user.info.WORK.MONEY=='6'}}selected="selected"{{/if}}>20001-50000元</option>
                        <option value="7" {{if $user.info.WORK.MONEY=='7'}}selected="selected"{{/if}}>50000元以上</option>
                    </select>
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">是否有房：</td>
    <td class="lf">
                    <input type="radio" class="f-radio" value="2" name="HOUSE" {{if $user.info.ASSET.HOUSE=='2'}}checked="checked"{{/if}}> 有
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="1" name="HOUSE" {{if $user.info.ASSET.HOUSE=='1'  || !$user.info.ASSET.HOUSE}}checked="checked"{{/if}}> 无
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">有无房贷：</td>
    <td class="lf">
                    <input type="radio" class="f-radio" value="2" name="HOUSE_DEAL" {{if $user.info.ASSET.HOUSE_DEAL=='2'}}checked="checked"{{/if}}> 有
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="1" name="HOUSE_DEAL" {{if $user.info.ASSET.HOUSE_DEAL=='1' || !$user.info.ASSET.HOUSE_DEAL}}checked="checked"{{/if}}> 无
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">是否有车：</td>
    <td class="lf">
                    <input type="radio" class="f-radio" value="2" name="CAR" {{if $user.info.ASSET.CAR=='2'}}checked="checked"{{/if}}> 有
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="1" name="CAR" {{if $user.info.ASSET.CAR=='1' || !$user.info.ASSET.CAR}}checked="checked"{{/if}}> 无
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr"> 有无车贷：</td>
    <td class="lf">
                    <input type="radio" class="f-radio" value="2" name="CAR_DEAL"  {{if $user.info.ASSET.CAR_DEAL=='2'}}checked="checked"{{/if}}> 有
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" class="f-radio" value="1" name="CAR_DEAL"  {{if $user.info.ASSET.CAR_DEAL=='1' || !$user.info.ASSET.CAR_DEAL}}checked="checked"{{/if}}> 无
    </td>
    </tr>
    <tr class="mouse">
    <td class="lr">车牌：</td>
    <td class="lf">
                <input type="text" id="CAR_ID" name="CAR_ID" value="{{$user.info.ASSET.CAR_ID}}">
    </td>
    </tr>
    <tr class="bottom">
    <td colspan="2" align="center"><input type="submit" name="btnSubmit" id="btnSubmit" value="确认保存" /></td>
    </tr>
</table>
</form>
{{include file="admin/infoot.html"}}
